package com.example.baidu_map_plugin;



import io.flutter.plugin.common.BinaryMessenger;
import io.flutter.plugin.common.MethodChannel;

public abstract class BaiduBasePlugin implements MethodChannel.MethodCallHandler {

    protected MethodChannel methodChannel;

    public BaiduBasePlugin(BinaryMessenger messenger, MethodChannel.MethodCallHandler methodCallHandler) {
        methodChannel = new MethodChannel(messenger, initChannelName());
        methodChannel.setMethodCallHandler(methodCallHandler);
    }

    public abstract String initChannelName();

    public void unRegister() {
        methodChannel.setMethodCallHandler(null);
    }
}
